#include "StdAfx.h"
#include "TalkObject.h"

namespace TalkProcess {
CTalkObject::CTalkObject(void)
{
	char buf[64];
	GUID talkID;
	CoInitialize(NULL);
	CoCreateGuid(&talkID);
	if (S_OK == ::CoCreateGuid(&talkID))
	{
		_snprintf_s(buf, sizeof(buf),
			"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
			talkID.Data1,
			talkID.Data2,
			talkID.Data3,
			talkID.Data4[0], talkID.Data4[1],
			talkID.Data4[2], talkID.Data4[3],
			talkID.Data4[4], talkID.Data4[5],
			talkID.Data4[6], talkID.Data4[7]);
	}
	m_TalkID = buf;
	CoUninitialize();

	m_CurrentState = NULL;
}

CTalkObject::~CTalkObject(void)
{
}
CTinyTalkState* CTalkObject::getState(void)
{
	return m_CurrentState;
}
}